Contacts
In simplest terms, a contact is a kind of window. The behavior of a window
object,
which is represented in CLX as an instance of the
window data type,
is completely specified by the X Window System
protocol. In CLUE, the class of contact objects is defined to be
a subclass of the class of window objects3. Thus, all CLX window functions
apply to any contact.
As a window, a contact inherits several basic attributes,
such as a
rectangular geometry (given by the position of its upper left corner, its width,
and its height in
pixel coordinates), a border width and border color/pattern, a depth (i.e.
bits per pixel), and a background color/pattern.
Contacts possess a few additional attributes (or slots) not shared
by ordinary windows.
- name: The name of
the contact is a
symbol which can be used to access contact resources
stored in a resource database. See Section .
- parent: All
contacts have a parent contact (except for a root contact, which is
created automatically by CLUE and which is the ancestor of all contacts on a
single display screen). The parent-child relationship
is fundamentally one between two windows, as defined by the X
Window System. For example, a child window is always visually
contained
by its parent window, and its position is specified relative to its
parent's upper-left corner. However, in CLUE this relationship is
extended, with the parent assuming additional responsibilities, such as
geometry management (see Section ).
- state: A switch which controls the visual effect of the contact on
the UI. If the state is :withdrawn, then the contact is invisible and
unavailable for input. If the state is :mapped, then the contact is
``viewable'' (i.e. visible unless it is covered by other windows) and available
for input. The state can also have a third value — :managed —
which is discussed in
Section . The default state is :mapped.
- event-translations: A list which associates
different types of input events with contact actions. This is discussed in more
detail in Section .
- callbacks: An association list of callback name/function pairs.
Subsections